package amqp.tutorials.all.simple;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class RabbitMQHandler {

    //装配MQSender
    @Resource
    private MQSender mqSender;

    //方法：调用消息生产者，发送消息
    @RequestMapping("/mq")
    @ResponseBody
    public void mq() {
        mqSender.send("hello llp");
    }
}
